//
//  myViewController.m
//  LaGou
//
//  Created by 苗钧豪 on 16/7/23.
//  Copyright © 2016年 苗钧豪. All rights reserved.
//

#import "myViewController.h"
#import "loginViewController.h"

@interface myViewController ()

@end

@implementation myViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationController.navigationBar.translucent = NO;
    UIButton *btn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    btn.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height / 3);
    btn.backgroundColor = [UIColor greenColor];
    [btn addTarget:self action:@selector(login:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:btn];
    // Do any additional setup after loading the view.
}
- (void)login:(UIButton *)btn {
    loginViewController *loginvc = [[loginViewController alloc]init];
    [self.navigationController pushViewController:loginvc animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
